<?php
namespace Model;

use Illuminate\Database\Capsule\Manager as DB;
use Library\Log;


/**
 * Dict Model
 * @author los_gsy
 */
class Dict extends Base {
	/**
	 * 构造函数
	 */
	public function __construct() {
		parent::__construct();
	}


	/**
	 * test
	 */
	static public function test() {
		return __METHOD__;
	}


	/**
	 * 通过编码，查询字典项
	 * @param string $type
	 * @param string $k
	 */
	static public function getByCode($code) {
		$result = DB::table('dict')
			->where('code', $code)
			->first();
		return $result;
	}


}